package indi.zhifa.study2025.oa.dao.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler;
import indi.zhifa.engine.core.common.ann.mp.CheckMin;
import indi.zhifa.engine.core.common.entity.mpe.BaseEntity;
import indi.zhifa.study2025.oa.model.enums.EMenuType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * <p>
 * 菜单表
 * </p>
 *
 * @author 芝麻酱
 * @since 2025-04-08
 */
@Data
@TableName(value = "menu",autoResultMap = true)
@Schema(title = "GenMenuEntity对象", description = "菜单表")
public class GenMenuEntity extends BaseEntity {

    @Schema(title = "版本码")
    private String versionCode;

    @CheckMin
    @Schema(title = "应用id")
    private Long appId;

    @CheckMin
    @Schema(title = "应用code")
    private String appCode;

    @CheckMin
    @Schema(title = "父级菜单Id")
    private Long parentId;

    @CheckMin
    @Schema(title = "菜单类型。1是模块，2是页面，3是按钮，4是请求，5是资源，6是逻辑节点")
    private EMenuType menuType;

    @CheckMin
    @Schema(title = "菜单码")
    private String code;

    @CheckMin
    @Schema(title = "菜单级联码")
    private String codeCascade;

    @Schema(title = "菜单名称")
    private String name;

    @Schema(title = "资源uri")
    private String uriResource;

    @Schema(title = "请求uri")
    private String uriRequest;

    @Schema(title = "前端组件名")
    private String component;

    @TableField(typeHandler = Fastjson2TypeHandler.class)
    @Schema(title = "数据权限组Id")
    private List<Long> dataGroupId;

}
